#include "OgreStableHeaders.h"
#include "OgreSkeletonManager.h"

#include "OgreSkeleton.h"

namespace Ogre
{
	template<> SkeletonManager* Singleton<SkeletonManager>::ms_Singleton = 0;
	SkeletonManager* SkeletonManager::getSingletonPtr(void)
	{
		return ms_Singleton;
	}

	SkeletonManager& SkeletonManager::getSingleton(void)
	{
		assert(ms_Singleton); return (*ms_Singleton);
	}

	SkeletonManager::SkeletonManager()
	{
		mLoadOrder = 300.0f;
		mResourceType = "Skeleton";

		ResourceGroupManager::getSingleton()._registerResourceManager(mResourceType, this);
	}

	SkeletonManager::~SkeletonManager()
	{
		ResourceGroupManager::getSingleton()._unregisterResourceManager(mResourceType);
	}

	Resource* SkeletonManager::createImpl(const String& name, ResourceHandle handle,
		const String& group, bool isManual, ManualResourceLoader* loader,
		const NameValuePairList* createParams)
	{
		return OGRE_NEW Skeleton(this, name, handle, group, isManual, loader);
	}
}
